/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.tamagochi.logica;

import br.com.tamagochi.bean.Tamagochi;

/**
 *
 * @author Allan & Fabiana
 */
public class Brincar implements Command{
    
    private Tamagochi tamagochi;
    private int unidade;
    
    public Brincar(Tamagochi tamagochi,int unidade){
        this.tamagochi = tamagochi;
        this.unidade = unidade;
    }
    
    @Override
    public void execute() {
        tamagochi.brincar(unidade);
    }

    @Override
    public void undo() {
        this.tamagochi.setAlteraImage(true);
    }
    
}
